package net.jlibrary.parking.action.vo;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import net.jlibrary.common.CoreConstants;
import net.jlibrary.common.core.annotation.VoForPo;
import net.jlibrary.common.core.entity.BaseVo;
import net.jlibrary.parking.domain.Parking;

@VoForPo(Parking.class)
public class ParkingVo extends BaseVo {
	private static final long serialVersionUID = 4964787706703021956L;
	private Long id;
	private String parkingName;
	private Integer spotNum;
	private String contactPhone;
	private String address;
	private boolean valid;
	private String nameSearchKey;
	@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
	@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
	private Date createdate;
	@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
	@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
	private Date lastdate;

	public String getNameSearchKey() {
		return nameSearchKey;
	}

	public void setNameSearchKey(String nameSearchKey) {
		this.nameSearchKey = nameSearchKey;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public boolean isValid() {
		return valid;
	}

	public void setValid(boolean valid) {
		this.valid = valid;
	}

	public String getParkingName() {
		return parkingName;
	}

	public void setParkingName(String parkingName) {
		this.parkingName = parkingName;
	}

	public Integer getSpotNum() {
		return spotNum;
	}

	public void setSpotNum(Integer spotNum) {
		this.spotNum = spotNum;
	}

	public String getContactPhone() {
		return contactPhone;
	}

	public void setContactPhone(String contactPhone) {
		this.contactPhone = contactPhone;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Date getCreatedate() {
		return createdate;
	}

	public void setCreatedate(Date createdate) {
		this.createdate = createdate;
	}

	public Date getLastdate() {
		return lastdate;
	}

	public void setLastdate(Date lastdate) {
		this.lastdate = lastdate;
	}

	@Override
	public Serializable getPrimaryKey() {

		return id;
	}

	@Override
	public Serializable getText() {
		// TODO Auto-generated method stub
		return parkingName;
	}

}
